<template>
  <div>
    <section>
      <!-- left side start-->
      <div class="left-side sticky-left-side">

        <!--logo and iconic logo start-->
        <div class="logo">
          <h1>WODDP</h1>
        </div>

        <div class="logo-icon text-center">
         Woddp
        </div>
        <!--logo and iconic logo end-->
        <div class="left-side-inner">

          <!-- visible to small devices only -->
          <div class="visible-xs hidden-sm hidden-md hidden-lg">
            <div class="media logged-user">
              <!--<img alt="" v-bind:src="userInfo.user_img" class="media-object" />-->
              <div class="media-body">
                <h4><a href="#/">{{userInfo.user_name}}</a></h4>
                <span>"Hello There..."</span>
              </div>
            </div>
          </div>

          <!--sidebar nav start-->
          <ul class="nav nav-pills nav-stacked custom-nav">
            <li class="active"> <router-link to="/"><i class="fa fa-home"></i><span>首 页</span></router-link></a></li>
            <li class="menu-list"><a href=""><i class="fa fa-book"></i> <span>文 章</span></a>
              <ul class="sub-menu-list">
                <li> <router-link to="/article/tagcategory">标签分类</router-link> </li>
                <li> <router-link to="/article/list">文章列表</router-link></li>
                <li><router-link to="/article/add">文章添加</router-link></li>
              </ul>
            </li>
            <li class="menu-list"><a href=""><i class="fa fa-user"></i> <span>用 户</span></a>
              <ul class="sub-menu-list">
                <li><router-link to="/user/info"> 我的信息</router-link></li>
                <li><router-link to="/user/list"> 用户列表</router-link></li>
                <li><router-link to="/article/list"> 添加用户</router-link></li>

              </ul>
            </li>



          </ul>
          <!--sidebar nav end-->

        </div>
      </div>
      <!-- left side end-->
      <div class="main-content" >
        <div class="header-section">

          <!--toggle button start-->
          <a class="toggle-btn"><i class="fa fa-bars"></i></a>
          <!--toggle button end-->

          <!--search start-->
          <form class="searchform" action="index.html" method="post">
            <input type="text" class="form-control" name="keyword" placeholder="Search here..." />
          </form>
          <!--search end-->

          <!--notification menu start -->
          <div class="menu-right">
            <ul class="notification-menu">
              <li>
                <a href="#/" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                  <img v-bind:src="userInfo.user_img" alt="" />
                  {{userInfo.user_name}}
                  <span class="caret"></span>
                </a>
                <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                  <li><a href="#/"><i class="fa fa-user"></i>  详情</a></li>
                  <li><a href="#/"><i class="fa fa-cog"></i>  设置</a></li>
                  <li><a href=""><i class="fa fa-sign-out"></i> 退出</a></li>
                </ul>
              </li>
            </ul>
          </div>
          <!--notification menu end -->

        </div>
        <router-view></router-view>
      </div>
    </section>
  </div>
</template>
<script>
  export default{
    data(){
      return {
         userInfo:[],
      }
    },
    mounted: function(){
         this.getUserInfo();
    },
    created: function(){

    },
    methods: {
      getUserInfo: function(){
        this.load.loading(true)
        this.$http.post('/admin/user/curr').then(function(response){
          this.load.loading(false)
          if(response.data.status){
             this.userInfo=response.data.data
          }
        },function(response){
        }).bind(this);
      }
    }
  }
</script>